<template>
	<view>
		<Home v-show="current == 0"></Home>
		<Message v-show="current == 1"></Message>
		<My v-show="current == 2"></My>
		<u-tabbar
			:value="current"
			activeColor="#fec500"
			inactiveColor="#a3a3a3"
			:border="false"
			@change="onChange"
		>
			<u-tabbar-item :text="$t('merchantHome.home')">
				<image class="tabImage" slot="inactive-icon" src="/static/tabbar/home1.png"></image>
				<image
					class="tabImage_active"
					slot="active-icon"
					src="/static/tabbar/home1_active.png"
				></image>
			</u-tabbar-item>
			<u-tabbar-item :text="$t('merchantHome.message')">
				<image class="tabImage" slot="inactive-icon" src="/static/tabbar/message.png"></image>
				<image
					class="tabImage_active"
					slot="active-icon"
					src="/static/tabbar/message_active.png"
				></image>
			</u-tabbar-item>
			<u-tabbar-item :text="$t('merchantHome.my')">
				<image class="tabImage" slot="inactive-icon" src="/static/tabbar/my1.png"></image>
				<image
					class="tabImage_active"
					slot="active-icon"
					src="/static/tabbar/my1_active.png"
				></image>
			</u-tabbar-item>
		</u-tabbar>
	</view>
</template>

<script>
import Home from '@/pagesA/my/home';
import Message from '@/pagesA/my/message';
import My from '@/pagesA/my/my';
export default {
	components: {
		Home,
		Message,
		My
	},
	data() {
		return {
			current: 0
		};
	},
	methods: {
		onChange(event) {
			this.current = event;
		}
	},
	onLoad() {},
	onShareAppMessage() {
		return {
			path: '/pages/home/index',
			imageUrl: '/static/image/share.png',
			title: '订餐就上小订铛'
		};
	}
};
</script>

<style lang="scss" scoped>
.tabImage_active,
.tabImage {
	width: 40rpx;
	height: 40rpx;
}
</style>
